<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
                <div class="ct_detail_box ct_detail_box_f">
                	<div class=" ct_detial_pd_box">
                    	<h1 class="ct_detail_pd_tt">猜你喜欢</h1>
                        <div class="ct_detail_box_mask" id="guessContent">
                        </div>
                        <div class="ct_detail_page">
                        	<a href="javascript:doGuessQuery();" class="detail_page_next"></a>
                        	<a href="javascript:doGuessQuery();" class="detail_page_pre"></a>                            
                        </div>
                    </div>
                </div>
<script type="text/javascript">
<!--
//查询猜你喜欢列表
function doGuessQuery(){	
	var url="${ctx}/front!getGuessList.action";
	$.post(url, "num=5" ,function callback(txt){   
			var json = $.parseJSON(txt);
			if (json.code==0) {
				createGuessNotes(json.info);				
			}else{
				alert('查询猜你喜欢列表失败！');
			}
		}	
	);
}
//创建猜你喜欢数据
function createGuessNotes(objs){		
	var c="";
	for(var i=0;i<objs.length;i++){
		var obj=objs[i];
		c+='<div class="ct_detail_pd_cell">';
		c+='     <p>';
		c+='        <a href="javascript:goDetail(\''+obj.goodsId+'\');" title="'+obj.goodsName+'" class="ct_detail_pd_pic">';
		c+='            <img src="'+obj.goodsPic+'" alt="'+obj.goodsName+'" width="94" height="111" />';
		c+='        </a>';
		c+='     </p>';
		c+='     <p>';
		c+='    	<a href="javascript:goDetail(\''+obj.goodsId+'\');" title="'+obj.goodsName+'">'+obj.goodsName+'</a>';
		c+='     </p>';
		c+='</div>';
	}	
	$('#guessContent').html(c);
}
//-->
</script>